package com.lagou.edu.client;

import com.lagou.edu.client.impl.TokenClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Author: yeqingyun
 * @Date: 2020/11/20 20:01
 */
@FeignClient(value = "lagou-service-code", path = "token", fallback = TokenClientFallback.class)
public interface TokenClient {

    @RequestMapping("/create/{email}")
    String create(@PathVariable("email") String email);

    @RequestMapping("/email/{token}")
    String email(@PathVariable("token") String token);
}
